 <?php
 	header('Content-type:text/json');
 	require('../conn.php');
	require('../functions.php');

	$page=$_GET['page'];
    $uid=$_GET['uid'];
	$max=10;
	$min=($page-1)*10;

	$rows=$mysql->query("select * from `newsdata` where `type`={$type} order by `id` limit {$min},{$max}");
		if ($rows) {
		    echo JSON($rows);
		}else{
	    	echo '1';
		}
	$mysql->__destruct();
	$mysql->close();
 ?>